package o;

import com.huawei.hms.support.api.iap.GetPurchasesResult;
import java.util.ArrayList;

public class crk {
    private static final Object ˋ = new Object();
    private static crk ˎ;

    public static crk ˊ() {
        crk o_crk;
        synchronized (ˋ) {
            if (ˎ == null) {
                ˎ = new crk();
            }
            o_crk = ˎ;
        }
        return o_crk;
    }

    public void ˎ() {
        crf.ˎ.ˋ("ProductDeliveryPatchManager", "The process of making up starts.");
        cro.ˏ().ˎ(2);
        crq.ˎ(ContentManager.getInstant().getContext(), 2);
    }

    public void ˊ(GetPurchasesResult getPurchasesResult) {
        ArrayList inAppPurchaseDataList = getPurchasesResult.getInAppPurchaseDataList();
        ArrayList inAppSignature = getPurchasesResult.getInAppSignature();
        if (inAppPurchaseDataList == null || inAppSignature == null) {
            cro.ˏ().ˏ(2);
            return;
        }
        int size = inAppPurchaseDataList.size();
        crf.ˎ.ˋ("ProductDeliveryPatchManager", "The number of unfinished orders:" + size);
        if (size == 0) {
            cro.ˏ().ˏ(8);
            return;
        }
        for (int i = 0; i < size; i++) {
            cro.ˏ().ॱ((String) inAppPurchaseDataList.get(i), (String) inAppSignature.get(i));
        }
        if (!cgy.ˎ(getPurchasesResult.getContinuationToken())) {
            crf.ˎ.ˋ("ProductDeliveryPatchManager", "Request next page of unfinished orders");
            crq.ˊ(getPurchasesResult.getContinuationToken());
        }
    }
}
